Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - sql: remove epoch info query cache #6575

Closed
wants to merge 3 commits into from

Conversation

ivan4th
Copy link
Contributor

@ivan4th ivan4th commented Dec 27, 2024

Motivation

The epoch info query cache mechanism contains a hard-to-fix deadlock, possibly due to a recursive RLock() on an RWMutex. Moreover, due to an oversight, in the default fetcher mode (streaming) epoch query cache is not actually being used, while the cached slice update calls which are causing deadlock are still being made upon adding each new ATX.
With syncv2, epoch info cache will no longer be needed at all, and with current network size, it isn't very useful either.

Description

This change removes epoch query cache, keeping blob query cache for now.

Test Plan

Make sure tests pass, including systests.

The epoch info query cache mechanism contains a hard-to-fix deadlock,
possibly due to a recursive RLock() on an RWMutex. Moreover, due to an
oversight, in the default fetcher mode (streaming) epoch query cache
is not actually being used, while the cached slice update calls which
are causing deadlock are still being made upon adding each new ATX.
With syncv2, epoch info cache will no longer be needed at all, and
with current network size, it isn't very useful either.

This change removes epoch query cache, keeping blob query cache for now.
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 70.83333% with 7 lines in your changes missing coverage. Please review.

Project coverage is 79.7%. Comparing base (b905784) to head (1a6d17c).
Report is 2 commits behind head on develop.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
fetch/handler.go 56.2% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #6575     +/-   ##
=========================================
- Coverage     79.7%   79.7%   -0.1%     
=========================================
  Files          355     355             
  Lines        47168   47097     -71     
=========================================
- Hits         37620   37561     -59     
+ Misses        7404    7394     -10     
+ Partials      2144    2142      -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ivan4th
Copy link
Contributor Author

ivan4th commented Jan 1, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Jan 1, 2025
## Motivation

The epoch info query cache mechanism contains a hard-to-fix deadlock, possibly due to a recursive RLock() on an RWMutex. Moreover, due to an oversight, in the default fetcher mode (streaming) epoch query cache is not actually being used, while the cached slice update calls which are causing deadlock are still being made upon adding each new ATX.
With syncv2, epoch info cache will no longer be needed at all, and with current network size, it isn't very useful either.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Jan 1, 2025

Pull request successfully merged into develop.

Build succeeded!

And happy new year! 🎉

@spacemesh-bors spacemesh-bors bot changed the title sql: remove epoch info query cache [Merged by Bors] - sql: remove epoch info query cache Jan 1, 2025
@spacemesh-bors spacemesh-bors bot closed this Jan 1, 2025
@spacemesh-bors spacemesh-bors bot deleted the remove-epoch-query-cache branch January 1, 2025 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants